const axios = require('axios');

axios.interceptors.response.use(res=>{
    return res.data;
})
// 获取项目列表
async function fetchRepoList(){
   return axios.get('https://api.github.com/orgs/zhu-cli/repos')
}
// 获取项目tag
async function fetchRepoTagList(repo){
    console.log(`111`, `https://api.github.com/orgs/zhu-cli/${repo}/tags`)
    return axios.get(`https://api.github.com/repos/zhu-cli/${repo}/tags`)
 }

module.exports = {
    fetchRepoList,
    fetchRepoTagList
}